<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        //1.let关键字定义变量--类型可变
        let a = 10;
        a = 'hello';
        alert(a);

        //2.const关键字定义常量 -- 一旦定义不可改变
        const b = 10;
        b = 30;//错误
        alert(b);

    </script>
    
</body>
</html>